
<%@ page import="com.mastercard.Voucher" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'voucher.label', default: 'Voucher')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-voucher" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-voucher" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list voucher">
			
				<g:if test="${voucherInstance?.description}">
				<li class="fieldcontain">
					<span id="description-label" class="property-label"><g:message code="voucher.description.label" default="Description" /></span>
					
						<span class="property-value" aria-labelledby="description-label"><g:fieldValue bean="${voucherInstance}" field="description"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${voucherInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="voucher.name.label" default="Name" /></span>
					
						<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${voucherInstance}" field="name"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${voucherInstance?.point}">
				<li class="fieldcontain">
					<span id="point-label" class="property-label"><g:message code="voucher.point.label" default="Point" /></span>
					
						<span class="property-value" aria-labelledby="point-label"><g:fieldValue bean="${voucherInstance}" field="point"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${voucherInstance?.quantity}">
				<li class="fieldcontain">
					<span id="quantity-label" class="property-label"><g:message code="voucher.quantity.label" default="Quantity" /></span>
					
						<span class="property-value" aria-labelledby="quantity-label"><g:fieldValue bean="${voucherInstance}" field="quantity"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${voucherInstance?.redeemed}">
				<li class="fieldcontain">
					<span id="redeemed-label" class="property-label"><g:message code="voucher.redeemed.label" default="Redeemed" /></span>
					
						<span class="property-value" aria-labelledby="redeemed-label"><g:fieldValue bean="${voucherInstance}" field="redeemed"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${voucherInstance?.redeemedVouchers}">
				<li class="fieldcontain">
					<span id="redeemedVouchers-label" class="property-label"><g:message code="voucher.redeemedVouchers.label" default="Redeemed Vouchers" /></span>
					
						<g:each in="${voucherInstance.redeemedVouchers}" var="r">
						<span class="property-value" aria-labelledby="redeemedVouchers-label"><g:link controller="redeemedVoucher" action="show" id="${r.id}">${r?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${voucherInstance?.validFrom}">
				<li class="fieldcontain">
					<span id="validFrom-label" class="property-label"><g:message code="voucher.validFrom.label" default="Valid From" /></span>
					
						<span class="property-value" aria-labelledby="validFrom-label"><g:formatDate date="${voucherInstance?.validFrom}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${voucherInstance?.validTo}">
				<li class="fieldcontain">
					<span id="validTo-label" class="property-label"><g:message code="voucher.validTo.label" default="Valid To" /></span>
					
						<span class="property-value" aria-labelledby="validTo-label"><g:formatDate date="${voucherInstance?.validTo}" /></span>
					
				</li>
				</g:if>
			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${voucherInstance?.id}" />
					<g:link class="edit" action="edit" id="${voucherInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
